﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Serialization;
using System.Data;
using System.Web.UI.HtmlControls;
public partial class MyProfiles : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        sharefb();
        HtmlMeta tag = new HtmlMeta();
        tag.Attributes.Add("property", "og:title");
        tag.Content = "My Goals";
        Page.Header.Controls.Add(tag);
        HtmlMeta tagDesc = new HtmlMeta();
        tagDesc.Attributes.Add("property", "og:description");
        tagDesc.Content = "My Goals";
        Page.Header.Controls.Add(tagDesc);
        HtmlMeta tagUrl = new HtmlMeta();
        tagUrl.Attributes.Add("property", "og:url");
        tagUrl.Content = Request.Url.AbsoluteUri;
        Page.Header.Controls.Add(tagUrl);
        HtmlMeta tagImage = new HtmlMeta();
        tagImage.Attributes.Add("property", "og:image");
        tagImage.Content = "http://www.planitmeal.com/Uploads/MealPlans/ShareChart.png";
        Page.Header.Controls.Add(tagImage);
        HtmlMeta tagId = new HtmlMeta();
        tagId.Attributes.Add("property", "fb:app_id");
        tagId.Content = "208238106017076";
        Page.Header.Controls.Add(tagId);
    }
    private void sharefb()
    {
        string url = Request.Url.AbsoluteUri;
        string facebooklink = "http://www.facebook.com/sharer.php?u=" + url;
        lnkFacebook.HRef = facebooklink;
        lnkGoogle.HRef = "https://plus.google.com/share?url=" + url;
        lnkTwitter.HRef = "https://twitter.com/intent/tweet?text=My Goals&url=" + url;
        lnkEmail.HRef = "mailto:?Subject=My Goals&body=Please check my goals%0ALink: " + url;
    }
   
}